home *** CD-ROM | disk | FTP | other *** search
- Path: chronicle.mti.sgi.com!austern
- From: tom@ssd.hcsc.com (Tom Horsley)
- Newsgroups: comp.std.c++
- Subject: Who gets out of memory exception?
- Followup-To: comp.std.c++
- Date: 28 Feb 1996 13:18:52 PST
- Organization: Harris Computer Systems Corporation
- Approved: austern@isolde.mti.sgi.com
- Message-ID: <TOM.96Feb28161011@amber.ssd.csd.harris.com>
- Reply-To: Tom.Horsley@hawk.hcsc.com
- NNTP-Posting-Host: isolde.mti.sgi.com
- X-Original-Date: 28 Feb 1996 21:10:11 GMT
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBVAwUBMTTGyUy4NqrwXLNJAQFiwwIAn7yJD3pLL0Adiw/nHAeyVWOluiN2mhAR
- iuFFkHxpLnREQByb+9r2Je03d346fAfcvw+3e1Ug0KCR82qDWPzEqg==
- =St0+
- Originator: austern@isolde.mti.sgi.com
-
- Someone showed me the "function try blocks" in the draft standard today, and
- I immediately began to wonder what happens if the function in question is
- a constructor and one of the exceptions I catch is "out of memory". If I
- have something like:
-
- Fred::Fred(...) try : initializers... {
- code goes here...
- } catch ...
-
- And then I say "new Fred" and run out of memory.
-
- I know some existing C++ implementations call the memory allocation code from
- inside the constructor and others call it from the place in the code where
- 'new' was invoked. So in different implementations today, the exception
- might actually occur in the caller or the constructor itself.
-
- Does the standard say who gets the memory exception? Or is running out of
- memory even an exception? Or is this simply left undefined?
- --
- --
- Tom.Horsley@mail.hcsc.com
- Home: 511 Kingbird Circle Delray Beach FL 33444
- Work: Harris Computers, 2101 W. Cypress Creek Rd. Ft. Lauderdale FL 33309
- Support Project Vote Smart! They need your support in non-election years too!
- (email pvs@neu.edu, 1-800-622-SMART, http://www.vote-smart.org)
- ---
- [ comp.std.c++ is moderated. To submit articles: Try just posting with your
- newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
- comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
- Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
- Comments? mailto:std-c++-request@ncar.ucar.edu
- ]
-